package com.dongdongshop.dao;

import com.dongdongshop.pojo.seckill.TbSeckillGoods;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Date;
import java.util.List;

/**
 * 秒杀
 * @Author Eayon
 * @Date 2020/4/5 14:51
 */
public interface SeckillGoodsRepostory extends JpaRepository<TbSeckillGoods,Long>, JpaSpecificationExecutor<TbSeckillGoods> {

    List<TbSeckillGoods> findAllByStatusEqualsAndStartTimeLessThanEqualAndEndTimeGreaterThanEqualAndStockCountGreaterThan(String status,Date startTime,Date endTime,Integer stockCount);


}
